home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIBufferedStreams.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  182 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIBufferedStreams.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIBufferedStreams_h__
  6. #define __gen_nsIBufferedStreams_h__
  7.  
  8.  
  9. #ifndef __gen_nsIInputStream_h__
  10. #include "nsIInputStream.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIOutputStream_h__
  14. #include "nsIOutputStream.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIBufferedInputStream */
  23. #define NS_IBUFFEREDINPUTSTREAM_IID_STR "616f5b48-da09-11d3-8cda-0060b0fc14a3"
  24.  
  25. #define NS_IBUFFEREDINPUTSTREAM_IID \
  26.   {0x616f5b48, 0xda09, 0x11d3, \
  27.     { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
  28.  
  29. /**
  30.  * An input stream that reads ahead and keeps a buffer coming from another input
  31.  * stream so that fewer accesses to the underlying stream are necessary.
  32.  */
  33. class NS_NO_VTABLE nsIBufferedInputStream : public nsIInputStream {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBUFFEREDINPUTSTREAM_IID)
  37.  
  38.   /**
  39.      * @param fillFromStream - add buffering to this stream
  40.      * @param bufferSize     - specifies the maximum buffer size
  41.      */
  42.   /* void init (in nsIInputStream fillFromStream, in unsigned long bufferSize); */
  43.   NS_IMETHOD Init(nsIInputStream *fillFromStream, PRUint32 bufferSize) = 0;
  44.  
  45. };
  46.  
  47. /* Use this macro when declaring classes that implement this interface. */
  48. #define NS_DECL_NSIBUFFEREDINPUTSTREAM \
  49.   NS_IMETHOD Init(nsIInputStream *fillFromStream, PRUint32 bufferSize); 
  50.  
  51. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  52. #define NS_FORWARD_NSIBUFFEREDINPUTSTREAM(_to) \
  53.   NS_IMETHOD Init(nsIInputStream *fillFromStream, PRUint32 bufferSize) { return _to Init(fillFromStream, bufferSize); } 
  54.  
  55. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  56. #define NS_FORWARD_SAFE_NSIBUFFEREDINPUTSTREAM(_to) \
  57.   NS_IMETHOD Init(nsIInputStream *fillFromStream, PRUint32 bufferSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(fillFromStream, bufferSize); } 
  58.  
  59. #if 0
  60. /* Use the code below as a template for the implementation class for this interface. */
  61.  
  62. /* Header file */
  63. class nsBufferedInputStream : public nsIBufferedInputStream
  64. {
  65. public:
  66.   NS_DECL_ISUPPORTS
  67.   NS_DECL_NSIBUFFEREDINPUTSTREAM
  68.  
  69.   nsBufferedInputStream();
  70.  
  71. private:
  72.   ~nsBufferedInputStream();
  73.  
  74. protected:
  75.   /* additional members */
  76. };
  77.  
  78. /* Implementation file */
  79. NS_IMPL_ISUPPORTS1(nsBufferedInputStream, nsIBufferedInputStream)
  80.  
  81. nsBufferedInputStream::nsBufferedInputStream()
  82. {
  83.   /* member initializers and constructor code */
  84. }
  85.  
  86. nsBufferedInputStream::~nsBufferedInputStream()
  87. {
  88.   /* destructor code */
  89. }
  90.  
  91. /* void init (in nsIInputStream fillFromStream, in unsigned long bufferSize); */
  92. NS_IMETHODIMP nsBufferedInputStream::Init(nsIInputStream *fillFromStream, PRUint32 bufferSize)
  93. {
  94.     return NS_ERROR_NOT_IMPLEMENTED;
  95. }
  96.  
  97. /* End of implementation class template. */
  98. #endif
  99.  
  100.  
  101. /* starting interface:    nsIBufferedOutputStream */
  102. #define NS_IBUFFEREDOUTPUTSTREAM_IID_STR "6476378a-da09-11d3-8cda-0060b0fc14a3"
  103.  
  104. #define NS_IBUFFEREDOUTPUTSTREAM_IID \
  105.   {0x6476378a, 0xda09, 0x11d3, \
  106.     { 0x8c, 0xda, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
  107.  
  108. /**
  109.  * An output stream that stores up data to write out to another output stream
  110.  * and does the entire write only when the buffer is full, so that fewer writes
  111.  * to the underlying output stream are necessary.
  112.  */
  113. class NS_NO_VTABLE nsIBufferedOutputStream : public nsIOutputStream {
  114.  public: 
  115.  
  116.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBUFFEREDOUTPUTSTREAM_IID)
  117.  
  118.   /**
  119.      * @param sinkToStream - add buffering to this stream
  120.      * @param bufferSize   - specifies the maximum buffer size
  121.      */
  122.   /* void init (in nsIOutputStream sinkToStream, in unsigned long bufferSize); */
  123.   NS_IMETHOD Init(nsIOutputStream *sinkToStream, PRUint32 bufferSize) = 0;
  124.  
  125. };
  126.  
  127. /* Use this macro when declaring classes that implement this interface. */
  128. #define NS_DECL_NSIBUFFEREDOUTPUTSTREAM \
  129.   NS_IMETHOD Init(nsIOutputStream *sinkToStream, PRUint32 bufferSize); 
  130.  
  131. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  132. #define NS_FORWARD_NSIBUFFEREDOUTPUTSTREAM(_to) \
  133.   NS_IMETHOD Init(nsIOutputStream *sinkToStream, PRUint32 bufferSize) { return _to Init(sinkToStream, bufferSize); } 
  134.  
  135. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  136. #define NS_FORWARD_SAFE_NSIBUFFEREDOUTPUTSTREAM(_to) \
  137.   NS_IMETHOD Init(nsIOutputStream *sinkToStream, PRUint32 bufferSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(sinkToStream, bufferSize); } 
  138.  
  139. #if 0
  140. /* Use the code below as a template for the implementation class for this interface. */
  141.  
  142. /* Header file */
  143. class nsBufferedOutputStream : public nsIBufferedOutputStream
  144. {
  145. public:
  146.   NS_DECL_ISUPPORTS
  147.   NS_DECL_NSIBUFFEREDOUTPUTSTREAM
  148.  
  149.   nsBufferedOutputStream();
  150.  
  151. private:
  152.   ~nsBufferedOutputStream();
  153.  
  154. protected:
  155.   /* additional members */
  156. };
  157.  
  158. /* Implementation file */
  159. NS_IMPL_ISUPPORTS1(nsBufferedOutputStream, nsIBufferedOutputStream)
  160.  
  161. nsBufferedOutputStream::nsBufferedOutputStream()
  162. {
  163.   /* member initializers and constructor code */
  164. }
  165.  
  166. nsBufferedOutputStream::~nsBufferedOutputStream()
  167. {
  168.   /* destructor code */
  169. }
  170.  
  171. /* void init (in nsIOutputStream sinkToStream, in unsigned long bufferSize); */
  172. NS_IMETHODIMP nsBufferedOutputStream::Init(nsIOutputStream *sinkToStream, PRUint32 bufferSize)
  173. {
  174.     return NS_ERROR_NOT_IMPLEMENTED;
  175. }
  176.  
  177. /* End of implementation class template. */
  178. #endif
  179.  
  180.  
  181. #endif /* __gen_nsIBufferedStreams_h__ */
  182.